<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/24 0024
 * Time: 16:04
 */
$fin = fopen('./readfrom', 'r');
$fout = fopen('./writeto', 'w');
$desctions = [0 => $fin, 1 => $fout];
$process = proc_open('php', $desctions, $pipes);
if (is_resource($process)) {
    proc_close($process);
}